package com.konne.nightmare.FastPublicOpinion.mvp.presenter;

import android.os.Handler;

import com.konne.nightmare.FastPublicOpinion.base.BaseMvpPresenter;
import com.konne.nightmare.FastPublicOpinion.mvp.view.ISelectSectionView;

import java.util.ArrayList;
import java.util.List;

/**
 * Create by ws.
 * on Data:2022/2/11  Time:下午 2:27.
 * description: ** .
 */
public class SelectSectionPresenter extends BaseMvpPresenter<ISelectSectionView> {

    public void init() {
        new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
                getView().updataSection(testGetSections());
            }
        },500);
    }
    private List<Section> testGetSections(){
        List<Section> sections=new ArrayList<>();
        List<String> beats=new ArrayList<>();
        beats.add("第 1 节  线性代数理论（2）");
        beats.add("第 2 节  线性代数理论（2）");
        beats.add("第 3 节  线性代数理论（2）");
        Section section=new Section("01","第一章 (2)",beats);
        sections.add(section);
        section=new Section("02","第二章 (2)",beats);
        sections.add(section);
        return sections;
    }
    public class Section{//测试用的具体根据接口创建
        public String sNum;
        public String sTitle;
        public List<String> beats;

        public Section(String sNum, String sTitle, List<String> beats) {
            this.sNum = sNum;
            this.sTitle = sTitle;
            this.beats = beats;
        }
    }
}
